/*
 * Created on 18/02/2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package bmoofxbridge.model;

import net.ofx.types.x2003.x04.AccountEnum;
import net.ofx.types.x2003.x04.BankAccount;

/**
 * @author Leonid
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class CreditCardAccount extends Account {
	/**
	 * @param bankName
	 * @param brunchName
	 * @param accountID
	 * @param cardID
	 */
	public CreditCardAccount(String bankName, String brunchName, String accountID, String cardID) {
		super(bankName, brunchName, accountID);
		this.cardID = cardID;
	}

	protected String cardID;
	
	
	
	

	/* (non-Javadoc)
	 * @see bmoofxbridge.model.Account#getAccountID()
	 */
	public String getAccountID() {
		return super.getAccountID()+" "+getCardID();
	}





	/**
	 * @return
	 */
	private String getCardID() {
		return cardID;
	}
	
	public net.ofx.types.x2003.x04.CreditCardAccount getCreditCardAccount(){
		net.ofx.types.x2003.x04.CreditCardAccount account = net.ofx.types.x2003.x04.CreditCardAccount.Factory.newInstance();		
		
		account.setACCTID(getAccountID());
		account.setACCTKEY(getAccountID());
		return account;
    }
}
